

-- D:\GOA\reslibrary\templete\res\item\item.phone.lua.xsl
gr_module("gm_xinbanchunzhongyun")

cgftraderecorditemItem = inherit(GmCtrl.ControlBase):name("cgftraderecorditemItem")

cgftraderecorditemItem.init = function (self,parent,aid)

	local top = self
	local win = parent.hostWindow
	local fid = aid or "cgftraderecorditemItem"
	GmCtrl.ControlBase.init(self,parent,fid,true)

	
	self.id = self:get_child("id")
	
	self.trade_code = self:get_child("trade_code")
	
	self.customer_id = self:get_child("customer_id")
	
	self.user_id = self:get_child("user_id")
	
	self.supplier_id = self:get_child("supplier_id")
	
	self.finance_order_group_id = self:get_child("finance_order_group_id")
	
	self.sell_id = self:get_child("sell_id")
	
	self.purchase_id = self:get_child("purchase_id")
	
	self.purchase_order_id = self:get_child("purchase_order_id")
	
	self.record_group_id = self:get_child("record_group_id")
	
	self.last_money_account = self:get_child("last_money_account")
	
	self.money = self:get_child("money")
	
	self.next_money_account = self:get_child("next_money_account")
	
	self.discount = self:get_child("discount")
	
	self.preferential = self:get_child("preferential")
	
	self.is_from_customer_account = self:get_child("is_from_customer_account")
	
	self.is_recharge = self:get_child("is_recharge")
	
	self.money_name = self:get_child("money_name")
	
	self.money_type = self:get_child("money_type")
	
	self.money_project_id = self:get_child("money_project_id")
	
	self.system_account_id = self:get_child("system_account_id")
	
	self.create_time = self:get_child("create_time")
	
	self.receiver = self:get_child("receiver")
	
	self.payer = self:get_child("payer")
	
	self.handler_uid = self:get_child("handler_uid")
	
	self.voucher = self:get_child("voucher")
	
	self.status = self:get_child("status")
	
	self.assignee_uid = self:get_child("assignee_uid")
	
	self.account_before_money = self:get_child("account_before_money")
	
	self.fill_time = self:get_child("fill_time")
	
	self.accepter = self:get_child("accepter")
	
	
	self:set_click(function(self)
		local ttop = top
		top.hostWindow:addNavFrame('__modal__info',nil,function(frame)
			local tttop = ttop
			print('########## $$$$$$$ 0')
			if frame and frame.set_data then
				frame:set_data(tttop.data)
			end
		end)
	end)
	
	
end


cgftraderecorditemItem.set_data = function(self,data)
	self.data = data
	for a,b in pairs(data) do
		if data[a] and self[a] and self[a].set_inner_text and self[a].is_init and self[a]:is_init() then
			self[a]:set_inner_text(tostring(data[a]))
		end
	end
end


	